#include <iostream>
#include <string>
#include <cstring>
#include <unistd.h>
#include "UdpServer.hpp"
#include <memory>
#include "commd.hpp"
using namespace std;

void Usage(string proc) { // 使用手册
    cout << "Usage: \n\t" << proc << " local_port\n" << endl;
}

int main(int argc, char* args[]) {
    if (argc != 2) {
        Usage(args[0]);
        return Usage_Erro;
    }
    uint16_t port = atoi(args[1]);
    // unique_ptr<UdpServer> up = unique_ptr<UdpServer>(UdpServer(ip, port));
    UdpServer* up = new UdpServer(port);
    up->Init();
    up->Start();


    return 0;
}